package atm;

import javax.swing.*;
import java.awt.*;

/**
 * 改密界面
 */
public class ChangePwdPanel extends JPanel{
    private ImageIcon sureImg = new ImageIcon("images/buttonSure.jpg");
    private ImageIcon clearImg = new ImageIcon("images/buttonClear.jpg");
    private ImageIcon offImg = new ImageIcon("images/buttonOff.jpg");
    private JButton sureBtn = new JButton(sureImg);
    private JButton clearBtn = new JButton(clearImg);
    private JButton offBtn = new JButton(offImg);
    private JLabel oldPwdLabel = new JLabel("请输入旧密码:");
    private JLabel newPwdLabel1 = new JLabel("请输入新密码:");
    private JLabel newPwdLabel2 = new JLabel("请再次输入新密码:");
    private JPasswordField oldPwdField = new JPasswordField();
    private JPasswordField newPwdField1 = new JPasswordField();
    private JPasswordField newPwdField2 = new JPasswordField();
    private Font font = new Font("黑体", Font.BOLD, 26);
    private Color color = new Color(173, 9, 9, 255);

    public ChangePwdPanel() {
        this.setLayout(null);
        oldPwdLabel.setBounds(265,200,240,50);
        oldPwdLabel.setFont(font);
        oldPwdLabel.setForeground(color);
        newPwdLabel1.setBounds(265,260,240,50);
        newPwdLabel1.setFont(font);
        newPwdLabel1.setForeground(color);
        newPwdLabel2.setBounds(220,320,240,50);
        newPwdLabel2.setFont(font);
        newPwdLabel2.setForeground(color);
        oldPwdField.setBounds(450,200,250,50);
        newPwdField1.setBounds(450,260,250,50);
        newPwdField2.setBounds(450,320,250,50);
        sureBtn.setBounds(884,240,140,50);
        clearBtn.setBounds(884,310,140,50);
        offBtn.setBounds(884,380,140,50);
        this.add(oldPwdLabel);
        this.add(newPwdLabel1);
        this.add(newPwdLabel2);
        this.add(oldPwdField);
        this.add(newPwdField1);
        this.add(newPwdField2);
        this.add(sureBtn);
        this.add(clearBtn);
        this.add(offBtn);
        this.setOpaque(false);
    }
}
